<template>
  <z-space>
    <z-button @click="success">Success</z-button>
    <z-button @click="error">Error</z-button>
    <z-button @click="warning">Warning</z-button>
  </z-space>
</template>
<script>
import { defineComponent } from 'vue'
import { message } from '../../../../lib/index.js'

export default defineComponent({
  name: 'MessageDemo2',
  setup() {
    const success = () => {
      message.success('This is a success message')
    }

    const error = () => {
      message.error('This is an error message')
    }

    const warning = () => {
      message.warning('This is a warning message')
    }

    return {
      success,
      error,
      warning
    }
  }
})
</script>
